Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin(language, converter): Respond to SIGINT #501

Merged
merged 1 commit into from
Aug 29, 2023
Merged

Conversation

abhinav
Copy link
Contributor

@abhinav abhinav commented Aug 28, 2023

Configures the language plugin binary to shut down the plugin RPC server
when SIGINT is received.
This will help the binary exit cleanly when it's time to shut down.

This functionality was added in pulumi/pulumi#13795.
pulumi/pulumi#13809 contains a similar change for Go, Python, and Node.

Copy link
Contributor Author

abhinav commented Aug 28, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@abhinav abhinav requested review from Frassle and a team August 28, 2023 21:48
//
// The returned channel is used to notify the server that it should
// stop serving and exit.
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need a defer'd cancel() // dregister the interrupt handler here like in the converter?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Derp, we do. Good catch. Fixed

abhinav added a commit to pulumi/pulumi-dotnet that referenced this pull request Aug 29, 2023
Shut the plugin down gracefully
when a SIGINT or CTRL_BREAK signal is received.

Related:

- pulumi/pulumi#13809
- pulumi/pulumi-yaml#501

Refs pulumi/pulumi#9780
abhinav added a commit to pulumi/pulumi-java that referenced this pull request Aug 29, 2023
Shut the plugin down gracefully
when a SIGINT or CTRL_BREAK signal is received.

Related:

- pulumi/pulumi#13809
- pulumi/pulumi-yaml#501
- pulumi/pulumi-dotnet#172

Refs pulumi/pulumi#9780
Configures the language plugin binary to shut down the plugin RPC server
when SIGINT is received.
This will help the binary exit cleanly when it's time to shut down.

This functionality was added in pulumi/pulumi#13795.
pulumi/pulumi#13809 contains a similar change for Go, Python, and Node.
@abhinav abhinav merged commit 3495a98 into main Aug 29, 2023
4 checks passed
@abhinav abhinav deleted the abhinav/sigint branch August 29, 2023 15:54
github-merge-queue bot pushed a commit to pulumi/pulumi-dotnet that referenced this pull request Aug 29, 2023
Shut the plugin down gracefully
when a SIGINT or CTRL_BREAK signal is received.

Related:

- pulumi/pulumi#13809
- pulumi/pulumi-yaml#501

Refs pulumi/pulumi#9780
abhinav added a commit to pulumi/pulumi-java that referenced this pull request Aug 29, 2023
Shut the plugin down gracefully
when a SIGINT or CTRL_BREAK signal is received.

Related:

- pulumi/pulumi#13809
- pulumi/pulumi-yaml#501
- pulumi/pulumi-dotnet#172

Refs pulumi/pulumi#9780
jkerken pushed a commit to algompluecker/pulumi-dotnet that referenced this pull request Jul 24, 2024
Shut the plugin down gracefully
when a SIGINT or CTRL_BREAK signal is received.

Related:

- pulumi/pulumi#13809
- pulumi/pulumi-yaml#501

Refs pulumi/pulumi#9780
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants